import multiprocessing
import time

list1 = []

def writ1(num):
    for i in range(num):
        list1.append(i)
        print(i)
        time.sleep(0.2)


def read1(num):
    for i in range(num):
        print(list1)
        time.sleep(0.2)


if __name__ == '__main__':
    writ11 = multiprocessing.Process(target= writ1,args=(5,))
    read11 = multiprocessing.Process(target=read1,args=(5,))
    writ11.daemon = True
    read11.daemon = True
    read11.start()
    writ11.start()
    print("完毕")
    time.sleep(2)
